package cn.weakup.designpattern.d_behavior.strategy;

import cn.weakup.designpattern.d_behavior.strategy.usepattern.Context;
import cn.weakup.designpattern.d_behavior.strategy.usepattern.CouponEnum;
import cn.weakup.designpattern.d_behavior.strategy.usepattern.PercentCouponDiscount;

import java.math.BigDecimal;

/**
 * @author lixj
 * @version 1.0.0
 * @date 2022/6/2
 * @desc
 */
public class Test {
    public static void main(String[] args) {
        Context<String> context = new Context(CouponEnum.PERCENT, "0.75");
        // 测试打折优惠
        System.out.println(context.discountAmount(new BigDecimal("100")));
    }
}
